<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    {{ getConfig('crowi', 'customize:header') | default('') }}

    <!-- polyfills for IE11 -->
    <script>
      var userAgent = window.navigator.userAgent.toLowerCase();
      if (userAgent.indexOf('msie') != -1 || userAgent.indexOf('trident') != -1) {
        var scriptElement = document.createElement('script');
        scriptElement.src = 'https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.23.0/polyfill.min.js';
        var headElement = document.getElementsByTagName('head')[0];
        headElement.appendChild(scriptElement);
      }
    </script>

    {{ cdnScriptTagsByGroup('basis') }}

    {% if env === 'development' %}
      <script src="{{ webpack_asset('js/dev.js') }}" async></script>
    {% endif %}

    <script src="{{ webpack_asset('js/legacy-presentation.js') }}" defer></script>
    <link rel="stylesheet" href="{{ webpack_asset('styles/style-presentation.css') }}">

    <title>{{ path|path2name }} | {{ path }}</title>

    {{ cdnStyleTagsByGroup('basis') }}
    {{ cdnHighlightJsStyleTag(getConfig('crowi', 'customize:highlightJsStyle')) }}

    <style>
      {{ customizeService.getCustomCss() }}
    </style>
  </head>
  <body>
    <div class="reveal">
      <div class="slides">
        {% set pageBreakSeparator = getConfig('markdown', 'markdown:presentation:pageBreakSeparator') | default(1) %}
        {% set pageBreakCustomSeparator = getConfig('markdown', 'markdown:presentation:pageBreakCustomSeparator') | default('') %}

        {% if 3 === pageBreakSeparator %}
          {% set dataSeparator = pageBreakCustomSeparator %}
        {% elseif 2 === pageBreakSeparator %}
          {% set dataSeparator = "\n-----\n" %}
        {% else %}
          {% set dataSeparator = "\n\n\n" %}
        {% endif %}

        <section data-markdown data-separator="{{dataSeparator}}">
          <script type="text/template">
{{ revision.body|presentation|safe }}
          </script>
        </section>
        <section  data-markdown># おしまい</section>
      </div>
    </div>

  </body>
</html>
